<template>
  <a :href="url" target="_blank" class="tool-card">
    <img :src="icon" :alt="name">
    <div class="tool-info">
      <h3>{{ name }}</h3>
      <p>{{ description }}</p>
    </div>
  </a>
</template>

<script setup lang="ts">
const props = defineProps<{
  name: string;
  description: string;
  icon: string;
  url: string;
}>();
</script>

<style scoped lang="scss">
.tool-card {
  background: #fff;
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: all 0.3s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;

  &:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  }

  img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
  }

  .tool-info {
    flex: 1;
    
    h3 {
      margin: 0 0 0.5rem;
      font-size: 1.1rem;
      color: #333;
    }

    p {
      margin: 0;
      color: #666;
      font-size: 0.9rem;
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      line-height: 1.4;
    }
  }
}
</style> 